//
//  mineTableView.m
//  HanlinWeather
//
//  Created by 任翰林 on 2017/4/9.
//  Copyright © 2017年 任翰林. All rights reserved.
//

#import "mineTableView.h"


@interface mineTableView ()<UITableViewDelegate,UITableViewDataSource>

@end



@implementation mineTableView

- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style
{
    if ([super initWithFrame:frame style:style]) {
        self.delegate = self;
        self.dataSource = self;
        [self setUpUI];
    }
    return self;
}

- (void)setUpUI
{
    
    HLLog(@"mine tableview");
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section;
{
    return 4;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
{
    
    UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
    
    if (!cell) {
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"];
    }
    cell.textLabel.text = [NSString stringWithFormat:@"%ld组,%ld行",indexPath.section,indexPath.row];
    
    if (indexPath.row == 0) {
        cell.textLabel.text = @"手机验证码及倒计时";
    }else if (indexPath.row == 1){
        cell.textLabel.text = @"验证码";
    }else if (indexPath.row == 2){
        cell.textLabel.text = @"一键更换全局字体";
    }else if (indexPath.row == 3){
        cell.textLabel.text = @"分享";
    }
    return cell;
}


- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    self.tablePushBlock(indexPath.section, indexPath.row);
}



@end
